﻿using BLL;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace WebAppi.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class MemberController : ControllerBase
    {
        public MemberController(Member_BLL bll)
        {
            Bll = bll;
        }

        public Member_BLL Bll { get; }

        /// <summary>
        /// 会员登录
        /// </summary>
        /// <param name="Name"></param>
        /// <param name="Pwd"></param>
        /// <returns></returns>
        [HttpPost("Login")]
        public IActionResult Login(string? Name, string? Pwd)
        {
            var m=Bll.Login(Name, Pwd);
            return Ok(new
            {
                data = m
            });

        }
    }
}
